//这里封装了接口内容
import http from './index'
/*==================菜单管理=================== */
//菜单列表接口
export const getMenuList=()=>http.get('/menulist?istree=true')
//菜单的添加
export const addMenu=(data:Object)=>http.post('/menuadd',data)
//菜单的删除
export const delMenu=(data:Object)=>http.post('/menudelete',data)
//菜单的编辑
export const editMenu=(data:Object)=>http.post('/menuedit',data)
//查看一条数据
export const getMenuInfo = (data:Object) =>http.get('/menuinfo',data)
/*==================角色管理=================== */
//角色列表接口
export const getrolelist=()=>http.get('/rolelist')
//角色的添加
export const roleadd=(data:Object)=>http.post('/roleadd',data)
//角色的删除
export const roledelete=(data:Object)=>http.post('/roledelete',data)
//角色的编辑
export const roleedit=(data:Object)=>http.post('/roleedit',data)
//查看一条数据
export const roleinfo = (data:Object) =>http.get('/roleinfo',data)
/*==================管理员管理=================== */
//菜单管理员列表接口
export const getuserlist=(data:Object)=>http.get('/userlist',data)
//菜单管理员的添加
export const useradd=(data:Object)=>http.post('/useradd',data)
//菜单管理员的删除
export const userdelete=(data:Object)=>http.post('/userdelete',data)
//菜单管理员的编辑
export const useredit=(data:Object)=>http.post('/useredit',data)
//查看一条数据
export const userinfo = (data:Object) =>http.get('/userinfo',data)
//管理员总数
export const usercount = ()=>http.get('/usercount')
//管理员登录
export const userlogin = (data:any)=>http.post('/userlogin',data)